package com.ruoyi.business.service.impl;

import java.util.List;

import com.ruoyi.business.mapper.GwPersonalMapper;
import com.ruoyi.business.service.IGwPersonalService;
import com.ruoyi.common.core.domain.entity.GwPersonal;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2024-07-23
 */
@Service
public class GwPersonalServiceImpl implements IGwPersonalService
{
    @Autowired
    private GwPersonalMapper gwPersonalMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param personalId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public GwPersonal selectGwPersonalByPersonalId(Long personalId)
    {
        return gwPersonalMapper.selectGwPersonalByPersonalId(personalId);
    }

    @Override
    public GwPersonal selectGwPersonalByUserId(Long userId)
    {
        return gwPersonalMapper.selectGwPersonalByUserId(userId);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param gwPersonal 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<GwPersonal> selectGwPersonalList(GwPersonal gwPersonal)
    {
        return gwPersonalMapper.selectGwPersonalList(gwPersonal);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param gwPersonal 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertGwPersonal(GwPersonal gwPersonal)
    {
        gwPersonal.setCreateTime(DateUtils.getNowDate());
        return gwPersonalMapper.insertGwPersonal(gwPersonal);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param gwPersonal 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateGwPersonal(GwPersonal gwPersonal)
    {
        gwPersonal.setUpdateTime(DateUtils.getNowDate());
        return gwPersonalMapper.updateGwPersonal(gwPersonal);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param personalIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteGwPersonalByPersonalIds(Long[] personalIds)
    {
        return gwPersonalMapper.deleteGwPersonalByPersonalIds(personalIds);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param personalId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteGwPersonalByPersonalId(Long personalId)
    {
        return gwPersonalMapper.deleteGwPersonalByPersonalId(personalId);
    }
}
